3.345 \(\int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx\)

Optimal. Leaf size=122 \[ -\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}+\frac {3 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d} \]

[Out]

3/8*I*arctanh(1/2*sec(d*x+c)*a^(1/2)*2^(1/2)/(a+I*a*tan(d*x+c))^(1/2))/d*2^(1/2)/a^(1/2)+1/2*I*cos(d*x+c)/d/(a
+I*a*tan(d*x+c))^(1/2)-3/4*I*cos(d*x+c)*(a+I*a*tan(d*x+c))^(1/2)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3502, 3490, 3489, 206} \[ -\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}+\frac {3 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]/Sqrt[a + I*a*Tan[c + d*x]],x]

[Out]

(((3*I)/4)*ArcTanh[(Sqrt[a]*Sec[c + d*x])/(Sqrt[2]*Sqrt[a + I*a*Tan[c + d*x]])])/(Sqrt[2]*Sqrt[a]*d) + ((I/2)*
Cos[c + d*x])/(d*Sqrt[a + I*a*Tan[c + d*x]]) - (((3*I)/4)*Cos[c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/(a*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3489

Int[sec[(e_.) + (f_.)*(x_)]/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*a)/(b*f), Subst[
Int[1/(2 - a*x^2), x], x, Sec[e + f*x]/Sqrt[a + b*Tan[e + f*x]]], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 + b^
2, 0]

Rule 3490

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(a*f*m), x] + Dist[a/(2*d^2), Int[(d*Sec[e + f*x])^(m + 2)*(a + b*Tan
[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b^2, 0] && EqQ[m/2 + n, 0] && GtQ[n, 0]

Rule 3502

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(b*f*(m + 2*n)), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rubi steps

\begin {align*} \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx &=\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}+\frac {3 \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx}{4 a}\\ &=\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {3}{8} \int \frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx\\ &=\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {(3 i) \operatorname {Subst}\left (\int \frac {1}{2-a x^2} \, dx,x,\frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}\\ &=\frac {3 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.55, size = 96, normalized size = 0.79 \[ \frac {\sec (c+d x) \left (3 i \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )-i (3 i \sin (2 (c+d x))+\cos (2 (c+d x))+1)\right )}{8 d \sqrt {a+i a \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]/Sqrt[a + I*a*Tan[c + d*x]],x]

[Out]

(Sec[c + d*x]*((3*I)*Sqrt[1 + E^((2*I)*(c + d*x))]*ArcTanh[Sqrt[1 + E^((2*I)*(c + d*x))]] - I*(1 + Cos[2*(c +
d*x)] + (3*I)*Sin[2*(c + d*x)])))/(8*d*Sqrt[a + I*a*Tan[c + d*x]])

________________________________________________________________________________________

fricas [B]  time = 0.68, size = 245, normalized size = 2.01 \[ \frac {{\left (3 i \, \sqrt {\frac {1}{2}} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (\frac {{\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (6 i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + 6 i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} + 6 i\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, d}\right ) - 3 i \, \sqrt {\frac {1}{2}} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (\frac {{\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (-6 i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - 6 i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} + 6 i\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, d}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-2 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{8 \, a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

1/8*(3*I*sqrt(1/2)*a*d*sqrt(1/(a*d^2))*e^(2*I*d*x + 2*I*c)*log(1/4*(sqrt(2)*sqrt(1/2)*(6*I*d*e^(2*I*d*x + 2*I*
c) + 6*I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(1/(a*d^2)) + 6*I)*e^(-I*d*x - I*c)/d) - 3*I*sqrt(1/2)*a*d*s
qrt(1/(a*d^2))*e^(2*I*d*x + 2*I*c)*log(1/4*(sqrt(2)*sqrt(1/2)*(-6*I*d*e^(2*I*d*x + 2*I*c) - 6*I*d)*sqrt(a/(e^(
2*I*d*x + 2*I*c) + 1))*sqrt(1/(a*d^2)) + 6*I)*e^(-I*d*x - I*c)/d) + sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*
(-2*I*e^(4*I*d*x + 4*I*c) - I*e^(2*I*d*x + 2*I*c) + I))*e^(-2*I*d*x - 2*I*c)/(a*d)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (d x + c\right )}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(cos(d*x + c)/sqrt(I*a*tan(d*x + c) + a), x)

________________________________________________________________________________________

maple [B]  time = 1.15, size = 319, normalized size = 2.61 \[ \frac {\sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (3 i \cos \left (d x +c \right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+8 i \left (\cos ^{3}\left (d x +c \right )\right )+3 i \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+3 \sqrt {2}\, \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+8 \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-12 i \cos \left (d x +c \right )\right )}{16 d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x)

[Out]

1/16/d*(a*(I*sin(d*x+c)+cos(d*x+c))/cos(d*x+c))^(1/2)*(3*I*cos(d*x+c)*2^(1/2)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(
1/2)*arctan(1/2*(I*cos(d*x+c)-I+sin(d*x+c))/sin(d*x+c)/(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*2^(1/2))+8*I*cos(d
*x+c)^3+3*I*2^(1/2)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*arctan(1/2*(I*cos(d*x+c)-I+sin(d*x+c))/sin(d*x+c)/(-2
*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*2^(1/2))+3*2^(1/2)*sin(d*x+c)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*arctan(1/
2*(I*cos(d*x+c)-I+sin(d*x+c))/sin(d*x+c)/(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*2^(1/2))+8*cos(d*x+c)^2*sin(d*x+
c)-12*I*cos(d*x+c))/a

________________________________________________________________________________________

maxima [B]  time = 1.27, size = 837, normalized size = 6.86 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

1/32*((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*((4*I*sqrt(2)*cos(2*d*x + 2*c)
+ 4*sqrt(2)*sin(2*d*x + 2*c) - 8*I*sqrt(2))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - 4*(sqrt
(2)*cos(2*d*x + 2*c) - I*sqrt(2)*sin(2*d*x + 2*c) - 2*sqrt(2))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2
*c) + 1)))*sqrt(a) - (6*sqrt(2)*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/
4)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(
2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1) - 6*sqrt(2)*arctan2((cos
(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d
*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(
2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - 1) - 3*I*sqrt(2)*log(sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*c
os(2*d*x + 2*c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sqrt(cos(2*d*x + 2*c)^2 + si
n(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + 2*(cos
(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d
*x + 2*c) + 1)) + 1) + 3*I*sqrt(2)*log(sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*
cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*
cos(2*d*x + 2*c) + 1)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 - 2*(cos(2*d*x + 2*c)^2 + sin
(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1))
*sqrt(a))/(a*d)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (c+d\,x\right )}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)/(a + a*tan(c + d*x)*1i)^(1/2),x)

[Out]

int(cos(c + d*x)/(a + a*tan(c + d*x)*1i)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+I*a*tan(d*x+c))**(1/2),x)

[Out]

Integral(cos(c + d*x)/sqrt(I*a*(tan(c + d*x) - I)), x)

________________________________________________________________________________________